package com.shop.cereshop.commons.domain.write;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

@Data
@TableName("cere_write_off_record")
public class CereWriteOffRecord {
  /**
   * 核销记录ID
   */
  @TableId(type = IdType.AUTO)
  private Long recordId;

  /**
   * 订单ID（关联订单表）
   */
  private Long orderId;

  /**
   * 订单商品ID(关联订单商品信息表)
   */
  private Long orderProductId;

  /**
   * 核销码
   */
  private String writeCode;

  /**
   * 核销前数量
   */
  private Integer beforeWriteNumber;

  /**
   * 核销后数量
   */
  private Integer afterWriteNumber;

  /**
   * 本次核销数量
   */
  private Integer writeCount;

  /**
   * 店铺ID
   */
  private Long shopId;

  /**
   * 核销时间
   */
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime writeTime;
}